1. This invention generally relates to an automatic focus adjustment device and method for use with a camera or the like.
2. Description of Related Art
An automatic focus adjustment device for use with cameras is known. For example, Japanese Unexamined Patent Publication Hei 2-146010, the subject matter of which is incorporated herein by reference, includes a so-called "overlap servo" function that tracks moving subjects by servo driving (hereinafter referred to as AF servo) the shooting lens to the focus position even when the charge accumulation type photosensitive element (hereinafter referred to as the AF sensor) is accumulating charge.
FIG. 10 is a diagram of a camera equipped with an automatic focus adjustment device that moves the shooting lens 1 to the focus position by driving a servo motor 7. Focus detection light rays pass through the shooting lens 1 and are formed into an image on the AF sensor 2 (such as a CCD or the like) within the camera body. Optical image signals from the AF sensor 2 are sent, via an interface 3, to a microcomputer 4 that controls the entire system.
The optical image pattern of the AF sensor 2 either undergoes A/D conversion in the interface 3 and outputs to the microcomputer 4, or the image pattern is amplified to a suitable signal level by the interface 3 and then undergoes direct A/D conversion by an A/D converter in the microcomputer 4. The microcomputer 4 calculates a defocus amount using a preset algorithm to process the optical image pattern, which has been converted into a digital signal, and calculates the lens driving amount needed to focus the shooting lens 1 based on the defocus amount. An explanation of the specific optical principles and algorithms used in defocus amount detection are omitted because the principles and algorithms are well known in the art.
An encoder 6 monitors the movement of the shooting lens 1 and produces a pulse each time the shooting lens 1 moves a predetermined amount along the optical axis. The microcomputer 4 drives the servo motor 7 by outputting the calculated lens driving amount to the driver 5. The driver 5 then drives the shooting lens 1 in the appropriate direction of focussing. Furthermore, the microcomputer 4 monitors the amount of movement of the shooting lens 1 through feedback pulses from the encoder 6 and stops the driving of the servo motor 7 when the number of counted feedback pulses equals the number of pulses corresponding to the defocus amount. Normally, the encoder 6 includes a photo-interrupter mounted on part of the reduction gear and the rotation shaft of the servo motor 7. The encoder 6 detects the rotation of the motor 7 driving the shooting lens 1.
As shown in FIG. 11, the defocus amount is the relative image plane discrepancy amount .DELTA.Z between the film plane (predicted image plane) and the plane in which the focus detection light rays that have passed through the shooting lens 1 are formed into an image (the image plane). The defocus amount is essentially equal to the lens driving amount necessary to effect focussing of the shooting lens 1. The shooting lens 1 is driven backward by the defocus amount .DELTA.Z.alpha. when a focus point is in front of the subject. The shooting lens is driven forward by the defocus amount .DELTA.Z.beta. when a point of focus is behind the subject. The defocus amount .DELTA.Z and the lens driving amount generally are not equal. However, the two are described as equal herein for illustration.
Japanese Unexamined Patent Publication Hei 2-146010 describes an overlap servo that simultaneously conducts distance measurement and lens driving. These two functions were previously conducted separately in sequence. With the overlap servo of Japanese Unexamined Patent Publication Hei 2-146010, the calculated defocus amount with the shooting lens 1 halted is equivalent to the defocus amount detected through distance measurement by the AF sensor 2 while the shooting lens is moving. Hereafter, this position will be referred to as the "distance measurement position." In other words, the amount of movement from this distance measurement position to the shooting lens position when the defocus amount computations are completed is subtracted from the calculated defocus amount. The next drive target for the shooting lens 1 is determined based on the defocus amount.
The method of calculating the distance measurement position in the overlap servo set forth in Japanese Unexamined Patent Publication Hei 2-146010 will be described with reference to FIG. 12. FIG. 12 shows an example when the shooting lens 1 is servo driven by the servo motor 7 to focus on the subject. The vertical axis on the left side represents the position Z of the lens along the optical axis. The horizontal axis represents the time t while the curve S shows the movement track as the shooting lens 1 is driven to the focus position. Feedback pulses produced by the encoder 6 during movement of the shooting lens 1 are shown below the time axis t.
As shown in FIG. 12, ta represents time when accumulation starts in the AF sensor 2 during movement of the shooting lens 1 and tb represents time when accumulation is concluded. The AF sensor 2 continuously accumulates electric charge in accordance with the optical image on the sensor light-receiving plane during the electric charge accumulation time interval T (also called the accumulation time interval or the accumulation period) from the time ta to the time tb. However, during this time, the light-receiving plane of the AF sensor 2 is continuously moving because of the movement of the shooting lens 1. The feedback pulses are output from the encoder 6 based on the movement of the shooting lens 1. When the continuous charge in the optical image is closely approximated by the optical image at the time when a feedback pulse is produced and the pulses are produced with sufficient resolution with respect to movement of the shooting lens 1, then errors from the approximation will be small and the final output of the AF sensor 2 can represent the sum of the infinitesimal electric charge accumulation amounts. The defocus amount obtained by processing the output of the AF sensor 2 using an appropriate AF algorithm is essentially the same as the weighted average of the defocus amounts obtained from the optical image on the AF sensor 2 when each pulse is produced. Weighting is accomplished using a ratio of the size of the infinitesimal electric charge accumulation amount during each respective pulse interval relative to the total electric charge accumulation amount. If the light quantities on the AF sensor 2 are assumed to be essentially uniform during accumulation in the sensor, the ratio of the size of the infinitesimal electric charge accumulation amount during each pulse interval relative to the total electric charge accumulation amount will simply be the ratio of each pulse interval relative to the total electric charge accumulation time.
The feedback pulses are counted by a counter in the microcomputer 4. Since this count value is the sum of the lens movement, the count value corresponds to the lens position Z along the optical axis (as shown by the vertical axis of FIG. 12). These two values have a nearly linear relationship based on whether the position along the optical axis is expressed in terms of distance (mm) or pulse number (count). The vertical axis to the right in FIG. 12 represents the position along the optical axis based on the pulse number. While t1, t2, . . . ,tn represent times when pulses are produced from the start of accumulation in the AF sensor 2, P1, P2, . . . , Pn correspond to count values during the same time. The value fn is the instantaneous defocus amount converted to a pulse number when the approximation is such that the shooting lens 1 is stopped at position Pn during the interval from Pn-1 to Pn and can be thought of as the contribution of (tn-(tn-1))/T to the defocus amount. Pf represents the value of the defocus amount following subject focussing. Accordingly, fn can be expressed by: EQU fn=Pf-Pn (1)
Therefore, the defocus amount f (expressed as a pulse number) is: ##EQU1##
Here, because the total of the accumulation times (tn-(tn-1)) is equal to the total accumulation time T, the result is: EQU T=.SIGMA.(tn-(tn-1)) (3)
Because the first term in Equation 2 includes Pf, the defocus amount f is expressed as: EQU f=Pf-.SIGMA.Pn*(tn-(tn-1))/T (4)
Equation 4 expresses the idea that when the position of the shooting lens 1 is expressed in terms of the pulse count value, the defocus amount obtained when lens movement and accumulation in the AF sensor 2 are conducted simultaneously is the same as the defocus amount obtained by distance measurement when the shooting lens 1 is stopped at the position EQU Pm=.SIGMA.Pn*(tn-(tn-1))/T (5)
Hereafter, the position of the shooting lens expressed by Equation 5 will be referred to as the "average distance measurement position." At the time tc when the AF algorithm has been concluded and the defocus amount f has been obtained, the lens driving amount is computed by subtracting the value Pm (from Equation 5) from the count value Pc at that time. In other words, the overlap servo determines the average distance measurement position from Equation 5.
The operation of a conventional device is explained hereafter with reference to the flowcharts of FIGS. 13 and 14. FIG. 13 is the main routine depicting operations of the AF sensor 2 and FIG. 14 is a routine depicting an interruption process during accumulation in the sensor.
As shown in FIG. 13, the buffer S, used for the accumulation value in Equation 5, is cleared in step S100. Accumulation starts in the AF sensor 2 during step S102. In step S104, a determination is made whether the electric charge accumulation has been conducted for a time interval appropriate for the strength of the light being received. An electric charge accumulation conclusion may be determined by providing a monitoring sensor to monitor light quantities on the AF sensor 2. The accumulation conclusion is determined when the output of the monitoring sensor exceeds a preset value. This method is often referred to as hard AGC. Alternatively, the accumulation conclusion may be determined by predicting the current accumulation time from a previous accumulation time and output level of the AF sensor 2. In such a case, the charge accumulation is accomplished after setting a timer to measure the accumulation times with respect to a predicted time. This method is referred to as soft AGC. When electric charge accumulation in the AF sensor 2 is concluded by either hard AGC or soft AGC, the output of the AF sensor 2 undergoes A/D conversion in the A/D converter of the microcomputer 4 and is stored in RAM. In step S106, the output data stored in RAM is processed using an AF algorithm to calculate a defocus amount. The calculated defocus amount is then converted in step S108 into a feedback pulse number Ps1.
The interruption routine shown in FIG. 14 is executed each time a feedback pulse is output from the encoder 6 accompanying the movement of the shooting lens 1 during accumulation in step S104. This routine performs the computations of Equation 5 and adds the result to the buffer S each time the routine of FIG. 14 is entered. As shown in FIG. 14, step S118 determines whether accumulation is taking place in the AF sensor 2. In such a case, the program advances to step S120. If accumulation is not taking place, the program returns to the main program in FIG. 13. In step S120, the elapsed time (tn-(tn-1)) from the previous interruption is added and the current time is stored in memory for the next interruption process. In the subsequent step S122, the feedback pulse count value Pn that was read is multiplied by the elapsed time (tn-(tn-1)) and is added to the buffer S. When the AF algorithm accumulation is concluded, EQU S=.SIGMA.Pn*(tn-(tn-1)) (6)
In returning to the main program of FIG. 13, the average distance measurement position Pm is calculated in step S110 using the value in the buffer S obtained by the interruption process indicated by Equation 6 and dividing the valve of the buffer S by the accumulation time T. In the subsequent step S112, the pulse count value is read and labeled Pc. In step S114, the servo target pulse number Ps2 is calculated as EQU Ps2=Ps1-(Pc-Pm) (7)
Ps1 represents the defocus amount calculated in step S108 (expressed as a pulse number), Pc represents the count value read in step S112 and Pm is the average distance measurement position calculated in step S110. In step S116, the servo target is refreshed to the value Ps2 as calculated from Equation 7 and the lens driving continues.
Normally, the processes from step S100 to step S116 is repeated several times while the shooting lens 1 is being servo driven to the target position. The distance measurement precision improves each time because the defocus amount becomes smaller. Focussing can frequently be effected with a single movement of the lens. In addition, it is possible for the lens to move to the next position quickly even when the lens stops in front of the subject or conversely moves beyond.
A focus state determination method for the described overlap servo is set forth in Japanese Unexamined Patent Publication Hei 4-133015.
In this method, P.alpha. is the pulse count value at the start of sensor accumulation, P.beta. is the pulse count value at the conclusion of accumulation and Z is the coefficient of conversion from the pulse count value to the defocus amount (mm). Accordingly, the lens movement amount Z (P.beta.-P.alpha.) is used for focus determination. For example, focus determination is not conducted when the lens movement amount is greater than a certain threshold value Zh. That is, focus determination only occurs when the following situation is true. EQU .vertline.Z(P.beta.-P.alpha.).vertline.&lt;Zh (8)
Therefore, a reduction of the precision and reliability of the distance measurement can be prevented when the amount of lens movement during sensor accumulation is large.
When the conditions established by Equation 8 are satisfied, the lens is considered to be in focus when the defocus amount def(m) is smaller than the threshold value Zi as in the following: EQU .vertline.def(m).vertline.&lt;Zi (9)
Thus, the lens is considered in focus when the conditions in both Equations 8 and 9 are met and the pulse number Ps2 of the servo target calculated with Equation 7 is established as the subsequent lens driving amount.
When the subject moves irregularly and when the photographer changes subjects while the camera is in the auto focus driving mode, a continuous mode is provided where the AF servo is continuously conducted to maintain the focus state while tracking a subject.
However, conventional automatic focus adjustment devices are deficient when the defocus amounts do not satisfy the focus determination standard established by Equation 9. Therefore, lens driving is conducted with excessive sensitivity.
Because such deficiencies arise because of the high responsiveness of the servo, the servo capacity should be thought of as being normal. However, this is considered to be a "defect" with an automatic focus camera because it is not desirable for lens movement to be performed intermittently after focussing.
This kind of deficiency arises when the shooting lens suddenly moves to the infinity point because the photographer measures the distance to an unwanted distant scene while changing subjects or when the shooting lens effects a hunting action because a defocus amount greater than the threshold amount is detected due to shaking of the camera or errors in distance measurement.
To handle this kind of deficiency, a Japanese Unexamined Patent Publication Sho 62-227109 describes the threshold value of focus determination being endowed with hysteresis. This results in a drop in the servo responsiveness following focussing because the threshold value following focussing becomes greater.
However, even this kind of method is ineffective in cases as described above when the distance to an undesired distant scene is measured and the subject is changed. In addition, when the detected defocus amount is less than a large threshold value after focussing, focus adjustment cannot be conducted even with poor focussing precision.